﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XRPGLibrary;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using XRPGLibrary;
using XRPGLibrary.Controls;
namespace myRPG.GameScreens
{
    //定义为可继承的抽象类
    public abstract partial class BaseGameState : GameState
    {
        #region Fields region
        protected Game1 GameRef;
        protected ControlManager ControlManager;//控件管理类
        protected PlayerIndex playerIndexInControl;//玩家索引对象
        #endregion
        #region Properties region
        #endregion
        #region Constructor Region
        public BaseGameState(Game game, GameStateManager manager)
            : base(game, manager)
        {
            GameRef = (Game1)game;
            playerIndexInControl = PlayerIndex.One;
        }
        #endregion
        #region XNA Method Region
        protected override void LoadContent()
        {
            ContentManager Content = Game.Content;//获得游戏的内容对象，通过它可以调用游戏中的资源
            SpriteFont menuFont = Content.Load<SpriteFont>(@"Fonts\gamefont");
            ControlManager = new ControlManager(menuFont);//初始化控件管理对象
            base.LoadContent();
        }
        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
        }
        public override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);
        }
        #endregion
    }
}